original code===>
[code]
while ($member = sql_fetch_array($res)) {
$i++;
if ($i < $num_per_page) {
$age = $gender = $local = '';
if ($member['gender'] != 2) {
$gender = gender($member['gender']);
}
if (!$member['hide_age']) {
$age = ', '.get_age($member['birthyear']);
}
section_content('<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');
}
}
[/code]
replace with ====>
[code]
while ($member = sql_fetch_array($res)) {
$isfriend = 0;
if (($client['id']) && ($client['id'] != $member['id'])) {
$isfriend = sql_counts(sql_query("SELECT * FROM ".tb()."friends WHERE uid={$member['id']} and fid={$client['id']}"));
}
$i++;
if ($i < $num_per_page) {
$age = $gender = $local = '';
if ($member['gender'] != 2) {
$gender = gender($member['gender']);
}
if (!$member['hide_age']) {
$age = ', '.get_age($member['birthyear']);
}
section_content('<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age);
if ((!$isfriend) && ($client['id'] != $member['id']) ) {
section_content('<br />'.url('friends/add/'.$member['id'],t('add as friend')));
}
section_content ('</li>');
}
}
[/code]
its work at my network.. thanks "god php" falcone.
if you want to see more people. not just 12, please edit
my/config.php
[code]
$num_per_page = 12;
[/code]
change 12 to whatever you want . example 50
[code]
$num_per_page = 50;
[/code] |